package deom1;

public class Test {
    public static void main(String[] args) {
        int n,i,x=1,sum=0;
        for (i = 2;i<=200;i++) {
            x=1;
            for (n = 2; n <= i-1 ; n++) {
                if(i%n==0) {
                    x=0;
                    break;
                }
            }
            if(x==1) {
                sum++;
                System.out.printf("%5d",i);
                if(sum%5==0)
                    System.out.println();
            }
        }
    }
}
